1 00:00:00,300 --> 00:00:07,800 Now that we have our teleporter going from pad A to pad B, let's go ahead and go from pad B to pad 2 00:00:08,040 --> 00:00:12,750 C down here and then we'll put some music in the box too, so they can listen to it while they're standing 3 00:00:12,750 --> 00:00:13,230 there. 4 00:00:13,260 --> 00:00:19,020 So let's open up our teleporter script and then we'll get a variable for pad C because that's where 5 00:00:19,020 --> 00:00:30,930 we want to go after pad B, Pad C equals script dot, parent, teleporter C, pad C, and we need two 6 00:00:30,930 --> 00:00:31,980 more variables. 7 00:00:31,980 --> 00:00:41,460 We need a D bounce flag can teleport and D bounces allow you to control how often something is going 8 00:00:41,460 --> 00:00:44,100 to be used so we can teleport. 9 00:00:44,100 --> 00:00:46,890 When this is true, we'll initialize it to true. 10 00:00:46,980 --> 00:00:54,300 Then we're going to do a cooldown and we'll make that like 5 seconds because we're testing this out. 11 00:00:54,300 --> 00:00:56,730 You're going to change this to whatever you want in the game. 12 00:00:56,730 --> 00:00:59,430 You might want to cool off in that box for a while. 13 00:00:59,880 --> 00:01:00,270 All right. 14 00:01:00,270 --> 00:01:03,780 So down here, if we have a player, we're going to do our teleporting, right? 15 00:01:03,780 --> 00:01:06,630 We're going to change our C frame to our humanoid route part. 16 00:01:06,960 --> 00:01:12,120 We are also going to check right here to make sure can teleport is true. 17 00:01:12,120 --> 00:01:16,860 So now these both have to be valid, has to be a player, can't be nil. 18 00:01:16,860 --> 00:01:18,600 And then this has to be true. 19 00:01:18,630 --> 00:01:19,680 It can't be false. 20 00:01:20,340 --> 00:01:20,610 All right. 21 00:01:20,610 --> 00:01:27,900 So when we teleport, we want to turn the can teleport to false. 22 00:01:27,900 --> 00:01:33,120 So the first person that touches that pad A is going to go next person. 23 00:01:33,120 --> 00:01:35,320 This is not going to work for them, Right. 24 00:01:35,340 --> 00:01:37,260 Whoever registers the touch first. 25 00:01:37,590 --> 00:01:39,780 And then what I'll do is I'll wait. 26 00:01:39,930 --> 00:01:40,190 Right. 27 00:01:40,200 --> 00:01:41,250 We're going to do a wait. 28 00:01:41,280 --> 00:01:45,150 We'll do it the cooldown time, which is only 5 seconds for us. 29 00:01:46,290 --> 00:01:50,160 Then we'll turn our can teleport back on to true. 30 00:01:50,190 --> 00:01:53,250 And as somebody else comes through, it doesn't matter because we're on our way out. 31 00:01:53,370 --> 00:01:53,760 Right? 32 00:01:53,760 --> 00:01:59,460 So then what I'm going to do is I'm going to get this humanoid part part C brain thing, right? 33 00:02:00,960 --> 00:02:05,030 And we'll just go ahead and change that to pad C. 34 00:02:05,040 --> 00:02:10,350 Still want to keep this vector three though, because you don't want to teleport inside pad C on top, 35 00:02:10,350 --> 00:02:11,400 Right on top. 36 00:02:11,490 --> 00:02:13,950 Let's try it out and then we'll add some music. 37 00:02:18,280 --> 00:02:20,230 Let's go into our teleporter. 38 00:02:20,530 --> 00:02:20,860 Boom! 39 00:02:20,860 --> 00:02:21,360 We're here. 40 00:02:21,370 --> 00:02:22,930 We've got to wait 5 seconds. 41 00:02:23,560 --> 00:02:25,310 One, two, three. 42 00:02:25,330 --> 00:02:25,960 There we go. 43 00:02:26,290 --> 00:02:28,060 All right, that's working pretty good. 44 00:02:28,060 --> 00:02:29,470 Let's add some music. 45 00:02:29,800 --> 00:02:30,020 All right? 46 00:02:30,040 --> 00:02:31,510 So go ahead and stop this. 47 00:02:34,600 --> 00:02:40,780 Let's go over to our game, my zombie game, and go to our toolbox. 48 00:02:41,530 --> 00:02:43,100 Under Marketplace. 49 00:02:43,120 --> 00:02:47,650 Go to audio and then type in elevator music. 50 00:02:47,680 --> 00:02:51,220 I already typed it in and we'll hit search. 51 00:02:51,250 --> 00:02:53,090 There is no elevator music. 52 00:02:53,110 --> 00:02:54,160 Never fear. 53 00:02:54,580 --> 00:03:01,300 Hit those three lines and then go ahead and click include Unverified Creators, which is most of the 54 00:03:01,300 --> 00:03:01,930 creators. 55 00:03:01,930 --> 00:03:03,190 So apply. 56 00:03:03,460 --> 00:03:06,040 And then I'm going to use this one right here. 57 00:03:06,040 --> 00:03:07,050 It's 31 seconds. 58 00:03:07,060 --> 00:03:08,050 Let's try it out. 59 00:03:10,660 --> 00:03:11,590 It's perfect. 60 00:03:11,950 --> 00:03:12,440 All right. 61 00:03:12,460 --> 00:03:14,110 Where do I want to put this? 62 00:03:14,830 --> 00:03:20,350 If you really want to be a purist, I would put an invisible part right smack in the center here. 63 00:03:20,350 --> 00:03:24,950 And that way you could keep your roll off pretty small so nobody could hear it outside. 64 00:03:24,970 --> 00:03:31,240 But what I'm going to do is I'm going to hit the alt key and then hit that roof part. 65 00:03:31,240 --> 00:03:31,560 Right? 66 00:03:31,570 --> 00:03:37,570 The alt key allows you to select stuff inside your model so you can see we selected the roof. 67 00:03:38,150 --> 00:03:43,380 I might change that name to to roof because I'm going to have music in it. 68 00:03:43,390 --> 00:03:47,380 That way you can hear the music if you're standing on the roof, if you do the part in the center of 69 00:03:47,380 --> 00:03:51,760 the room, you can make it so that you can only hear it in the room, which is be good for elevators. 70 00:03:51,850 --> 00:03:52,170 Right? 71 00:03:52,210 --> 00:03:55,750 So I'm going to do an insert, but there's an elevator music. 72 00:03:56,410 --> 00:03:57,940 I might just change out the music. 73 00:03:59,500 --> 00:04:00,190 Hit enter. 74 00:04:00,460 --> 00:04:01,630 I'm going to go down here. 75 00:04:01,630 --> 00:04:03,940 I'm going to turn Looped on. 76 00:04:03,940 --> 00:04:07,510 So it's just going to keep looping and playing on. 77 00:04:07,510 --> 00:04:12,730 So it's going to start playing when we start playing our game and then we could do volume and stuff 78 00:04:12,730 --> 00:04:13,150 like that. 79 00:04:13,150 --> 00:04:14,350 But I think we're all right. 80 00:04:14,350 --> 00:04:19,780 What I want to do is I want to look for the max roll off distance. 81 00:04:19,780 --> 00:04:21,970 I don't want to hear this on the ground. 82 00:04:21,970 --> 00:04:25,480 I want it to be kind of contained in the box. 83 00:04:25,480 --> 00:04:29,080 We're not really doing it inside the box because it's on the roof. 84 00:04:29,080 --> 00:04:31,840 But let's just make that 20. 85 00:04:31,990 --> 00:04:32,950 That's all right. 86 00:04:33,640 --> 00:04:36,310 Because this is 20. 87 00:04:36,310 --> 00:04:38,470 By 20, this is ten by ten. 88 00:04:38,590 --> 00:04:42,520 You won't hear that music below this point. 89 00:04:42,940 --> 00:04:43,270 Right? 90 00:04:43,270 --> 00:04:44,080 Right about here. 91 00:04:44,710 --> 00:04:45,370 Cool. 92 00:04:45,370 --> 00:04:46,480 Let's try it. 93 00:04:51,800 --> 00:04:52,490 Will run over. 94 00:04:52,490 --> 00:04:52,980 I'm going to turn. 95 00:04:53,000 --> 00:04:54,260 I'm going to make this go away. 96 00:04:54,290 --> 00:04:54,920 Here we go. 97 00:04:55,190 --> 00:04:56,900 Let's run over to our teleporter. 98 00:04:56,900 --> 00:04:59,030 We need to get a zapping sound to. 99 00:05:01,020 --> 00:05:02,010 Suede. 100 00:05:02,690 --> 00:05:04,640 Now the 1002. 101 00:05:04,670 --> 00:05:05,360 There we go. 102 00:05:05,630 --> 00:05:07,040 I start counting late. 103 00:05:07,490 --> 00:05:08,180 Nice. 104 00:05:08,210 --> 00:05:12,610 All right, so the next video, we're going to do the cool down stuff for this, right? 105 00:05:12,630 --> 00:05:14,740 We're going to we're going to make this go dull. 106 00:05:14,750 --> 00:05:19,940 We're going to make a zapping sound, and then we're going to put a zapping sound from B to C to.